<% form_tag ({:action => 'create'}, :multipart => true) do %>

<%= error_messages_for 'photo' %>

<!--[form:photos]-->

<h2>
   <span style="float: right;">
      <%= button_for 'Another Photo Field', 'add', 'javascript:add_file()' %>
   </span>
   File
</h2>
<p id="file_list">
   <%= file_field_tag 'photo[]', :class => "formField" %>
</p>

<script type="text/javascript" charset="utf-8">
   function add_file() {
      new Insertion.Bottom($('file_list'), "<input class='formField' id='photo[]' name='photo[]' type='file' />")
   }
</script>

<!--[eoform:photos]-->

<h2>
   <span style="float: right;">
      <%= button_for "Cancel", "cancel", { :action => 'index' } %>
   </span>
   <%= button_for 'Upload', 'add', "javascript:document.forms[0].submit()"%>
</h2>

<% end %>